/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DialogSelectAccount.java
 *
 * Created on 08.06.2011, 14:58:33
 */
package ru.icq.gui.dialogs;

import java.awt.CardLayout;
import java.awt.Component;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import javax.swing.DefaultListModel;
import javax.swing.Icon;
import org.apache.log4j.Logger;
import ru.icq.io.connections.ProtocolType;
import ru.icq.exceptions.PropertiesExceptions;
import ru.icq.gui.dialogs.Renderer.IconListRenderer;
import ru.icq.gui.frame.FrameICQ;
import ru.icq.io.FileProperties;
import ru.icq.io.loadTheme;
import ru.icq.utils.Utils;

/**
 * Мастер настройки аккаунтов.
 * @author Носов А.В.
 */
public class DialogSelectAccount extends javax.swing.JDialog {

    // Variables declaration
    private static final Logger log = Logger.getLogger(DialogSelectAccount.class);
    
    private DefaultListModel modelList;
    
    private FrameICQ parent;
    private loadTheme theme = new loadTheme("Default", "Russian");
    
    private short finish = -1;
    private final short FIRST_CARD = -1;
    private final short ICQ_CARD = 0;
    private final short JABBER_CARD = 1;
    private final short VK_CARD = 2;
    // End of variables declaration

    /** Creates new form DialogSelectAccount */
    public DialogSelectAccount(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        this.parent = (FrameICQ) parent;
        
        initComponents();
        
        setTheme(theme);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        java.awt.GridBagConstraints gridBagConstraints;

        panelSelect = new javax.swing.JPanel();
        panelSelectAccount = new javax.swing.JPanel();
        panelFirst = new javax.swing.JPanel();
        labelFirstName = new javax.swing.JLabel();
        textAreaFirstText = new javax.swing.JTextArea();
        scrollPaneListAccounts = new javax.swing.JScrollPane();
        modelList = new DefaultListModel();
        listAccounts = new javax.swing.JList();
        panelSettingsAccount = new javax.swing.JPanel();
        panelJabberInfo = new javax.swing.JPanel();
        labelAccountHeading = new javax.swing.JLabel();
        textAreaAccountInfo = new javax.swing.JTextArea();
        panelCheckAccount = new javax.swing.JPanel();
        panelJABBERAccount = new javax.swing.JPanel();
        labelJabber = new javax.swing.JLabel();
        labelJabberName = new javax.swing.JLabel();
        textFieldJabberName = new javax.swing.JTextField();
        labelJabberPassword = new javax.swing.JLabel();
        textFieldJabberPassword = new javax.swing.JPasswordField();
        labelJabberPort = new javax.swing.JLabel();
        textFieldJabberPort = new javax.swing.JTextField();
        panelICQAccount = new javax.swing.JPanel();
        labelICQ = new javax.swing.JLabel();
        labelICQName = new javax.swing.JLabel();
        textFieldICQName = new javax.swing.JTextField();
        labelICQPassword = new javax.swing.JLabel();
        textFieldICQPassword = new javax.swing.JPasswordField();
        labelICQServer = new javax.swing.JLabel();
        textFieldICQServer = new javax.swing.JTextField();
        labelICQPort = new javax.swing.JLabel();
        textFieldICQPort = new javax.swing.JTextField();
        panelVKAccount = new javax.swing.JPanel();
        labelVK = new javax.swing.JLabel();
        labelVKName = new javax.swing.JLabel();
        textFieldVKName = new javax.swing.JTextField();
        labelVKPassword = new javax.swing.JLabel();
        textFieldVKPassword = new javax.swing.JPasswordField();
        labelVKPort = new javax.swing.JLabel();
        textFieldVKPort = new javax.swing.JTextField();
        panelPasswordInfo = new javax.swing.JPanel();
        checkBoxSave = new javax.swing.JCheckBox();
        checkBoxAutoInput = new javax.swing.JCheckBox();
        panelSelectButtons = new javax.swing.JPanel();
        panelAccountButtons = new javax.swing.JPanel();
        buttonSelectBack = new javax.swing.JButton();
        buttonSelectForward = new javax.swing.JButton();
        buttonSelectCansel = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setName("account.dialogSelectAccount"); // NOI18N

        panelSelect.setBorder(javax.swing.BorderFactory.createEmptyBorder(15, 25, 5, 25));
        panelSelect.setLayout(new java.awt.CardLayout());

        panelSelectAccount.setLayout(new java.awt.BorderLayout());

        panelFirst.setLayout(new java.awt.GridLayout(2, 1, 5, 5));

        labelFirstName.setFont(new java.awt.Font("Times New Roman", 1, 24));
        labelFirstName.setText("Protocol");
        labelFirstName.setName("account.firstName"); // NOI18N
        panelFirst.add(labelFirstName);

        textAreaFirstText.setBackground(labelFirstName.getBackground());
        textAreaFirstText.setColumns(20);
        textAreaFirstText.setEditable(false);
        textAreaFirstText.setFont(new java.awt.Font("Times New Roman", 0, 14));
        textAreaFirstText.setLineWrap(true);
        textAreaFirstText.setRows(3);
        textAreaFirstText.setTabSize(0);
        textAreaFirstText.setText("Need text");
        textAreaFirstText.setName("account.firstText"); // NOI18N
        panelFirst.add(textAreaFirstText);

        panelSelectAccount.add(panelFirst, java.awt.BorderLayout.PAGE_START);

        listAccounts.setBorder(javax.swing.BorderFactory.createEtchedBorder(javax.swing.border.EtchedBorder.RAISED));
        listAccounts.setModel(getList());
        listAccounts.setCellRenderer(new IconListRenderer(getIcon()));
        scrollPaneListAccounts.setViewportView(listAccounts);

        panelSelectAccount.add(scrollPaneListAccounts, java.awt.BorderLayout.CENTER);

        panelSelect.add(panelSelectAccount, "first");

        panelSettingsAccount.setLayout(new java.awt.BorderLayout());

        panelJabberInfo.setLayout(new java.awt.GridLayout(2, 1));

        labelAccountHeading.setFont(new java.awt.Font("Times New Roman", 1, 18));
        labelAccountHeading.setText("no  text");
        labelAccountHeading.setName("account.heading"); // NOI18N
        panelJabberInfo.add(labelAccountHeading);

        textAreaAccountInfo.setBackground(labelAccountHeading.getBackground());
        textAreaAccountInfo.setColumns(1);
        textAreaAccountInfo.setRows(3);
        textAreaAccountInfo.setTabSize(0);
        textAreaAccountInfo.setText("no text");
        textAreaAccountInfo.setName("account.info"); // NOI18N
        panelJabberInfo.add(textAreaAccountInfo);

        panelSettingsAccount.add(panelJabberInfo, java.awt.BorderLayout.PAGE_START);

        panelCheckAccount.setLayout(new java.awt.CardLayout());

        panelJABBERAccount.setLayout(new java.awt.GridLayout(9, 1));

        labelJabber.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        labelJabber.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelJabber.setText("JABBER");
        panelJABBERAccount.add(labelJabber);

        labelJabberName.setText("Name");
        labelJabberName.setName("account.nameid"); // NOI18N
        panelJABBERAccount.add(labelJabberName);
        panelJABBERAccount.add(textFieldJabberName);

        labelJabberPassword.setText("Password");
        labelJabberPassword.setName("account.password"); // NOI18N
        panelJABBERAccount.add(labelJabberPassword);
        panelJABBERAccount.add(textFieldJabberPassword);

        labelJabberPort.setText("Port");
        labelJabberPort.setName("account.port"); // NOI18N
        panelJABBERAccount.add(labelJabberPort);

        textFieldJabberPort.setText("5222");
        panelJABBERAccount.add(textFieldJabberPort);

        panelCheckAccount.add(panelJABBERAccount, "JABBER_CARD");

        panelICQAccount.setLayout(new java.awt.GridLayout(11, 1));

        labelICQ.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        labelICQ.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelICQ.setText("ICQ");
        panelICQAccount.add(labelICQ);

        labelICQName.setText("Name");
        labelICQName.setName("account.nameid"); // NOI18N
        panelICQAccount.add(labelICQName);
        panelICQAccount.add(textFieldICQName);

        labelICQPassword.setText("Password");
        labelICQPassword.setName("account.password"); // NOI18N
        panelICQAccount.add(labelICQPassword);
        panelICQAccount.add(textFieldICQPassword);

        labelICQServer.setText("Server");
        labelICQServer.setName("account.server"); // NOI18N
        panelICQAccount.add(labelICQServer);

        textFieldICQServer.setText("login.icq.com");
        panelICQAccount.add(textFieldICQServer);

        labelICQPort.setText("Port");
        labelICQPort.setName("account.port"); // NOI18N
        panelICQAccount.add(labelICQPort);

        textFieldICQPort.setText("5190");
        panelICQAccount.add(textFieldICQPort);

        panelCheckAccount.add(panelICQAccount, "ICQ_CARD");

        panelVKAccount.setLayout(new java.awt.GridLayout(9, 1));

        labelVK.setFont(new java.awt.Font("Ubuntu", 1, 18)); // NOI18N
        labelVK.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        labelVK.setText("VKONTAKTE");
        panelVKAccount.add(labelVK);

        labelVKName.setText("Name");
        labelVKName.setName("account.nameid"); // NOI18N
        panelVKAccount.add(labelVKName);
        panelVKAccount.add(textFieldVKName);

        labelVKPassword.setText("Password");
        labelVKPassword.setName("account.password"); // NOI18N
        panelVKAccount.add(labelVKPassword);
        panelVKAccount.add(textFieldVKPassword);

        labelVKPort.setText("Port");
        labelVKPort.setName("account.port"); // NOI18N
        panelVKAccount.add(labelVKPort);

        textFieldVKPort.setText("5222");
        panelVKAccount.add(textFieldVKPort);

        panelCheckAccount.add(panelVKAccount, "VK_CARD");

        panelSettingsAccount.add(panelCheckAccount, java.awt.BorderLayout.CENTER);

        panelPasswordInfo.setLayout(new java.awt.GridLayout(2, 1));

        checkBoxSave.setText("Save password");
        checkBoxSave.setName("account.savePassword"); // NOI18N
        panelPasswordInfo.add(checkBoxSave);

        checkBoxAutoInput.setText("Auto input");
        checkBoxAutoInput.setName("account.autoinput"); // NOI18N
        checkBoxAutoInput.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                checkBoxAutoInputItemStateChanged(evt);
            }
        });
        panelPasswordInfo.add(checkBoxAutoInput);

        panelSettingsAccount.add(panelPasswordInfo, java.awt.BorderLayout.PAGE_END);

        panelSelect.add(panelSettingsAccount, "account");

        getContentPane().add(panelSelect, java.awt.BorderLayout.CENTER);

        panelSelectButtons.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 25, 5, 25));
        panelSelectButtons.setLayout(new java.awt.BorderLayout());

        panelAccountButtons.setLayout(new java.awt.GridBagLayout());

        buttonSelectBack.setText("Back");
        buttonSelectBack.setEnabled(false);
        buttonSelectBack.setName("account.back"); // NOI18N
        buttonSelectBack.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSelectBackActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 0;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 5);
        panelAccountButtons.add(buttonSelectBack, gridBagConstraints);

        buttonSelectForward.setText("Forward");
        buttonSelectForward.setName("account.forward"); // NOI18N
        buttonSelectForward.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSelectForwardActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 1;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 5);
        panelAccountButtons.add(buttonSelectForward, gridBagConstraints);

        buttonSelectCansel.setText("Cansel");
        buttonSelectCansel.setName("account.cansel"); // NOI18N
        buttonSelectCansel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonSelectCanselActionPerformed(evt);
            }
        });
        gridBagConstraints = new java.awt.GridBagConstraints();
        gridBagConstraints.gridx = 2;
        gridBagConstraints.gridy = 0;
        gridBagConstraints.insets = new java.awt.Insets(3, 5, 3, 5);
        panelAccountButtons.add(buttonSelectCansel, gridBagConstraints);

        panelSelectButtons.add(panelAccountButtons, java.awt.BorderLayout.LINE_END);

        getContentPane().add(panelSelectButtons, java.awt.BorderLayout.PAGE_END);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void buttonSelectBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSelectBackActionPerformed
        visibleCard(-1);
    }//GEN-LAST:event_buttonSelectBackActionPerformed

    private void buttonSelectForwardActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSelectForwardActionPerformed
        visibleCard(listAccounts.getSelectedIndex());
    }//GEN-LAST:event_buttonSelectForwardActionPerformed

    private void buttonSelectCanselActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonSelectCanselActionPerformed
        this.setVisible(false);
    }//GEN-LAST:event_buttonSelectCanselActionPerformed

    private void checkBoxAutoInputItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_checkBoxAutoInputItemStateChanged
        if (checkBoxAutoInput.isSelected()) { 
            checkBoxSave.setSelected(true);
            checkBoxSave.setEnabled(false);
        } else {
            checkBoxSave.setEnabled(true);
        }
    }//GEN-LAST:event_checkBoxAutoInputItemStateChanged

    /**
     * Возвращает список аккаунтов, которые можно создать.
     * @return список аккаунтов
     */
    private DefaultListModel getList() {
        modelList.addElement("ICQ");
        modelList.addElement("Jabber");
        modelList.addElement("VKontakte");
        return modelList;
    }

    /**
     * Возвращает список иконок, для аккаунтов.
     * @return список иконок
     */
    private Map<Object, Icon> getIcon() {
        Map<Object, Icon> icons = new HashMap<Object, Icon>();
        icons.put("ICQ", theme.getIcon("account.icq"));
        icons.put("Jabber", theme.getIcon("account.jabber"));
        icons.put("VKontakte", theme.getIcon("account.vkontakte"));
        return icons;
    }

    /**
     * 
     * @param selectCard 
     */
    private void visibleCard(int selectCard) {
        CardLayout cl = (CardLayout)panelSelect.getLayout();
        CardLayout clAccount = (CardLayout)panelCheckAccount.getLayout();
        switch (selectCard) {
            case FIRST_CARD:
                buttonSelectBack.setEnabled(false);
                cl.show(panelSelect, "first");
                break;
            case ICQ_CARD:
                cl.show(panelSelect, "account");
                clAccount.show(panelCheckAccount, "ICQ_CARD");
                buttonSelectBack.setEnabled(true);
                if (finish == selectCard) createICQ();
                finish = ICQ_CARD;
                break;
            case JABBER_CARD:
                cl.show(panelSelect, "account");
                clAccount.show(panelCheckAccount, "JABBER_CARD");
                buttonSelectBack.setEnabled(true);
                if (finish == selectCard) createJabber();
                finish = JABBER_CARD;
                break;
            case VK_CARD:
                cl.show(panelSelect, "account");
                clAccount.show(panelCheckAccount, "VK_CARD");
                buttonSelectBack.setEnabled(true);
                if (finish == selectCard) createVK();
                finish = VK_CARD;
                break;
            default:
        }
    }

    private void createICQ() {
        String uid = textFieldICQName.getText();
        String server = textFieldICQServer.getText();
        String port = textFieldICQPort.getText();
        char[] passwordChar = textFieldICQPassword.getPassword();
        uid = uid.trim();
        
        String password = new String(passwordChar);
        password = password.trim();
        
        if (!isUid(uid)) return;
        if (!isPassword(password)) return;
        if (!isNameServer(server));
        if (!isPort(port));
        
        Properties p = new Properties();
        
        p.setProperty("uid", uid);
        if (checkBoxSave.isSelected())
            p.setProperty("pass", password);
        else p.setProperty("pass", "");
        p.setProperty("input", String.valueOf(checkBoxAutoInput.isSelected()));
        p.setProperty("server", server);
        p.setProperty("port", port);
        
        if (!saveAccount(p, ProtocolType.ICQ)) return;
        this.setVisible(false);
    }

    private void createJabber() {
        String uid = textFieldJabberName.getText();
        String server = uid.substring(uid.indexOf("@")+1, uid.length());
        String port = textFieldJabberPort.getText();
        char[] passwordChar = textFieldJabberPassword.getPassword();
        uid = uid.trim();
        
        String password = new String(passwordChar);
        password = password.trim();
        
        if (!isUid(uid)) return;
        if (!isPassword(password)) return;
        if (!isNameServer(server));
        if (!isPort(port));
        
        Properties p = new Properties();
        
        p.setProperty("uid", uid);
        if (checkBoxSave.isSelected())
            p.setProperty("pass", password);
        else p.setProperty("pass", "");
        p.setProperty("input", String.valueOf(checkBoxAutoInput.isSelected()));
        p.setProperty("server", server);
        p.setProperty("port", port);
        
        if (!saveAccount(p, ProtocolType.JABBER)) return;
        this.setVisible(false);
    }

    private void createVK() {
        String uid = textFieldVKName.getText();
        String server = uid.substring(uid.indexOf("@")+1, uid.length());
        String port = textFieldVKPort.getText();
        char[] passwordChar = textFieldVKPassword.getPassword();
        uid = uid.trim();
        
        String password = new String(passwordChar);
        password = password.trim();
        
        if (!isUid(uid)) return;
        if (!isPassword(password)) return;
        if (!isNameServer(server));
        if (!isPort(port));
        
        Properties p = new Properties();
        
        p.setProperty("uid", uid);
        if (checkBoxSave.isSelected())
            p.setProperty("pass", password);
        else p.setProperty("pass", "");
        p.setProperty("input", String.valueOf(checkBoxAutoInput.isSelected()));
        p.setProperty("server", server);
        p.setProperty("port", port);
        
        if (!saveAccount(p, ProtocolType.VKONTAKTE)) return;
        this.setVisible(false);
    }

    private boolean saveAccount(Properties prop, ProtocolType type) {
        try {
            String user = parent.getSelectUser().getName();
            
            String path = System.getProperty("user.dir") + File.separator +
                "Users" + File.separator + "jICQ." + user + File.separator;

            File folder = new File(path + type.toString() + "." + prop.getProperty("uid"));
            if (folder.exists()) {
                Utils.isShowErrorMessage(this, "Такой аккаунт уже существует.");
                return false;
            }
            folder.mkdir();
            
            FileProperties.createProperties(folder.getAbsolutePath() + File.separator + 
                    "account.properties", prop);
            return true;
        } catch (PropertiesExceptions ex) {
            log.error("Создание аккаунта прервано", ex);
            return false;
        }
    }

    /**
     * Проверка правильности ввода uid
     * @param uid имя пользователя
     * @return 
     */
    private boolean isUid(String uid) {
        if (uid.equals("")) {
            Utils.isShowErrorMessage(this, "Поле 'Имя пользователя' обязательно "
                    + "для заполнения");
            return false;
        } else return true;
    }

    /**
     * Проверка правильности ввода пароля
     * @param password пароль
     * @return 
     */
    private boolean isPassword(String password) {
        if (password.equals("")) {
            Utils.isShowErrorMessage(this, "Поле 'Пароль пользователя' обязательно "
                    + "для заполнения");
            return false;
        } else return true;
    }

    /**
     * Проверка правильности ввода сервера
     * @param server сервер
     * @return 
     */
    private boolean isNameServer(String server) {
        if (server.equals("")) {
            Utils.isShowErrorMessage(this, "Поле 'Имя пользователя' заполенно не верно");
            return false;
        } else return true;
    }

    /**
     * Проверка правильности ввода сервера
     * @param server сервер
     * @return 
     */
    private boolean isServer(String server) {
        if (server.equals("")) {
            Utils.isShowErrorMessage(this, "Поле 'Сервер' обязательно "
                    + "для заполнения");
            return false;
        } else return true;
    }

    /**
     * Проверка правильности ввода порта
     * @param port порт
     * @return 
     */
    private boolean isPort(String port) {
        if (port.equals("")) {
            Utils.isShowErrorMessage(this, "Поле 'Port' обязательно "
                    + "для заполнения");
            return false;
        } else return true;
    }

    /**
     * Устанвливает тему.
     * @param theme класс темы
     */
    public void setTheme(loadTheme theme) {
        if (theme != null) this.theme = theme;
        this.theme.setTheme( (Component)this );
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                DialogSelectAccount dialog = new DialogSelectAccount(new java.awt.Frame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton buttonSelectBack;
    private javax.swing.JButton buttonSelectCansel;
    private javax.swing.JButton buttonSelectForward;
    private javax.swing.JCheckBox checkBoxAutoInput;
    private javax.swing.JCheckBox checkBoxSave;
    private javax.swing.JLabel labelAccountHeading;
    private javax.swing.JLabel labelFirstName;
    private javax.swing.JLabel labelICQ;
    private javax.swing.JLabel labelICQName;
    private javax.swing.JLabel labelICQPassword;
    private javax.swing.JLabel labelICQPort;
    private javax.swing.JLabel labelICQServer;
    private javax.swing.JLabel labelJabber;
    private javax.swing.JLabel labelJabberName;
    private javax.swing.JLabel labelJabberPassword;
    private javax.swing.JLabel labelJabberPort;
    private javax.swing.JLabel labelVK;
    private javax.swing.JLabel labelVKName;
    private javax.swing.JLabel labelVKPassword;
    private javax.swing.JLabel labelVKPort;
    private javax.swing.JList listAccounts;
    private javax.swing.JPanel panelAccountButtons;
    private javax.swing.JPanel panelCheckAccount;
    private javax.swing.JPanel panelFirst;
    private javax.swing.JPanel panelICQAccount;
    private javax.swing.JPanel panelJABBERAccount;
    private javax.swing.JPanel panelJabberInfo;
    private javax.swing.JPanel panelPasswordInfo;
    private javax.swing.JPanel panelSelect;
    private javax.swing.JPanel panelSelectAccount;
    private javax.swing.JPanel panelSelectButtons;
    private javax.swing.JPanel panelSettingsAccount;
    private javax.swing.JPanel panelVKAccount;
    private javax.swing.JScrollPane scrollPaneListAccounts;
    private javax.swing.JTextArea textAreaAccountInfo;
    private javax.swing.JTextArea textAreaFirstText;
    private javax.swing.JTextField textFieldICQName;
    private javax.swing.JPasswordField textFieldICQPassword;
    private javax.swing.JTextField textFieldICQPort;
    private javax.swing.JTextField textFieldICQServer;
    private javax.swing.JTextField textFieldJabberName;
    private javax.swing.JPasswordField textFieldJabberPassword;
    private javax.swing.JTextField textFieldJabberPort;
    private javax.swing.JTextField textFieldVKName;
    private javax.swing.JPasswordField textFieldVKPassword;
    private javax.swing.JTextField textFieldVKPort;
    // End of variables declaration//GEN-END:variables
}
